<template>
  <div class="ownfeature">
    <div class="ownfeature--item">
      <div class="ownfeature--item--title">常规特征</div>
      <div class="ownfeature--box" v-if="pos == '甲状腺'">
        <div class="ownfeature--sub--title">
          <span class="ownfeature--sub--left">甲状腺特征</span>
          <span
            :class="['ownfeature--sub--right', { noavtive: !thyroidThmusKey }]"
            @click="thyroidThmusKey = !thyroidThmusKey"
          >
            <HeadSvg type="feature" />
          </span>
        </div>
        <div :class="['ownfeature--pos--box', { noavtive: !thyroidThmusKey }]">
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
              >形态:</span
            >
            <a-select
              :class="['ownfeatureselect', { active: isCanEdit }]"
              defaultValue="规则"
              v-model="shape"
              :disabled="recordDisabled || !isCanEdit"
            >
              <a-select-option value="规则"> 规则 </a-select-option>
              <a-select-option value="不规则"> 不规则 </a-select-option>
            </a-select>
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
              >回声强度:</span
            >
            <a-select
              :class="['ownfeatureselect', { active: isCanEdit }]"
              defaultValue="等回声"
              v-model="echo_intensity"
              :disabled="recordDisabled || !isCanEdit"
            >
              <a-select-option value="等回声"> 等回声 </a-select-option>
              <a-select-option value="低回声"> 低回声 </a-select-option>
              <a-select-option value="高回声"> 高回声 </a-select-option>
            </a-select>
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
              >回声分布:</span
            >
            <a-select
              :class="['ownfeatureselect', { active: isCanEdit }]"
              defaultValue="均匀"
              v-model="echo_distribution"
              :disabled="recordDisabled || !isCanEdit"
            >
              <a-select-option value="均匀"> 均匀 </a-select-option>
              <a-select-option value="不均匀"> 不均匀 </a-select-option>
            </a-select>
          </div>
        </div>
        <div class="ownfeature--sub--title">
          <span class="ownfeature--sub--left">甲状腺大小(cm)</span>
          <span
            :class="['ownfeature--sub--right', { noavtive: !thyroidRKey }]"
            @click="thyroidRKey = !thyroidRKey"
          >
            <HeadSvg type="feature" />
          </span>
        </div>
        <div :class="['ownfeature--pos--box', { noavtive: !thyroidRKey }]">
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: thyroid_0 }]"
              >峡部前后径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: thyroid_0 }]"
              v-model="thyroid_0"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: thyroid_1 }]"
              >右叶左右径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: thyroid_1 }]"
              v-model="thyroid_1"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: thyroid_2 }]"
              >右叶前后径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: thyroid_2 }]"
              v-model="thyroid_2"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: thyroid_3 }]"
              >右叶上下径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: thyroid_3 }]"
              v-model="thyroid_3"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: thyroid_4 }]"
              >左叶左右径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: thyroid_4 }]"
              v-model="thyroid_4"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: thyroid_5 }]"
              >左叶前后径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: thyroid_5 }]"
              v-model="thyroid_5"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: thyroid_6 }]"
              >左叶上下径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: thyroid_6 }]"
              v-model="thyroid_6"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
        </div>
      </div>
      <div class="ownfeature--box" v-if="pos == '颈动脉'">
        <div class="ownfeature--sub--title">
          <span class="ownfeature--sub--left">颈动脉特征</span>
        </div>
        <div class="ownfeature--pos">
          <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
            >斑块:</span
          >
          <a-select
            :class="['ownfeatureselect', { active: isCanEdit }]"
            defaultValue="无"
            v-model="plaque"
            :disabled="recordDisabled || !isCanEdit"
          >
            <a-select-option value="无"> 无 </a-select-option>
            <a-select-option value="单发"> 单发 </a-select-option>
            <a-select-option value="多发"> 多发 </a-select-option>
          </a-select>
        </div>
        <div class="ownfeature--pos">
          <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
            >IMT:</span
          >
          <a-select
            :class="['ownfeatureselect', { active: isCanEdit }]"
            defaultValue="未见内中膜增厚"
            v-model="IMT"
            :disabled="recordDisabled || !isCanEdit"
          >
            <a-select-option value="未见内中膜增厚" title="未见内中膜增厚">
              未见内中膜增厚
            </a-select-option>
            <a-select-option value="内中膜增厚" title="内中膜增厚">
              内中膜增厚
            </a-select-option>
          </a-select>
        </div>
        <div class="ownfeature--pos">
          <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
            >是否光滑:</span
          >
          <a-select
            :class="['ownfeatureselect', { active: isCanEdit }]"
            defaultValue="光滑"
            v-model="smooth"
            :disabled="recordDisabled || !isCanEdit"
          >
            <a-select-option value="光滑"> 光滑 </a-select-option>
            <a-select-option value="不光滑"> 不光滑 </a-select-option>
          </a-select>
        </div>
        <div class="ownfeature--sub--title">
          <span class="ownfeature--sub--left">L-窦部</span>
          <span
            :class="['ownfeature--sub--right', { noavtive: !arteryLBifKey }]"
            @click="arteryLBifKey = !arteryLBifKey"
          >
            <HeadSvg type="feature" />
          </span>
        </div>

        <div :class="['ownfeature--pos--box', { noavtive: !arteryLBifKey }]">
          <div class="ownfeature--pos">
            <span
              :class="[
                'ownfeature--pos--left',
                { active: LeftCrossBifurcation_d },
              ]"
              >管径(mm):</span
            >
            <input
              type="text"
              :class="[
                'ownfeature--pos--val',
                { active: LeftCrossBifurcation_d },
              ]"
              v-model="LeftCrossBifurcation_d"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span
              :class="[
                'ownfeature--pos--left',
                { active: LeftCrossBifurcation },
              ]"
              >IMT(mm):</span
            >
            <input
              type="text"
              :class="[
                'ownfeature--pos--val',
                { active: LeftCrossBifurcation },
              ]"
              v-model="LeftCrossBifurcation"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span
              :class="[
                'ownfeature--pos--left',
                { active: LeftCrossBifurcation_PSED },
              ]"
              >PS/ED(cm/s):</span
            >
            <input
              type="text"
              :class="[
                'ownfeature--pos--val',
                { active: LeftCrossBifurcation_PSED },
              ]"
              v-model="LeftCrossBifurcation_PSED"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
        </div>

        <div class="ownfeature--sub--title">
          <span class="ownfeature--sub--left">L-ICA</span>
          <span
            :class="['ownfeature--sub--right', { noavtive: !arteryLICAKey }]"
            @click="arteryLICAKey = !arteryLICAKey"
          >
            <HeadSvg type="feature" />
          </span>
        </div>

        <div :class="['ownfeature--pos--box', { noavtive: !arteryLICAKey }]">
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: LeftLongICA_d }]"
              >管径(mm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: LeftLongICA_d }]"
              v-model="LeftLongICA_d"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: LeftLongICA }]"
              >IMT(mm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: LeftLongICA }]"
              v-model="LeftLongICA"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span
              :class="['ownfeature--pos--left', { active: LeftLongICA_PSED }]"
              >PS/ED(cm/s):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: LeftLongICA_PSED }]"
              v-model="LeftLongICA_PSED"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
        </div>

        <div class="ownfeature--sub--title">
          <span class="ownfeature--sub--left">L-CCA</span>
          <span
            :class="['ownfeature--sub--right', { noavtive: !arteryLECAKey }]"
            @click="arteryLECAKey = !arteryLECAKey"
          >
            <HeadSvg type="feature" />
          </span>
        </div>

        <div :class="['ownfeature--pos--box', { noavtive: !arteryLECAKey }]">
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: LeftLongCCA_d }]"
              >管径(mm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: LeftLongCCA_d }]"
              v-model="LeftLongCCA_d"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: LeftLongCCA }]"
              >IMT(mm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: LeftLongCCA }]"
              v-model="LeftLongCCA"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span
              :class="['ownfeature--pos--left', { active: LeftLongCCA_PSED }]"
              >PS/ED(cm/s):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: LeftLongCCA_PSED }]"
              v-model="LeftLongCCA_PSED"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
        </div>

        <div class="ownfeature--sub--title">
          <span class="ownfeature--sub--left">R-窦部</span>
          <span
            :class="['ownfeature--sub--right', { noavtive: !arteryRBifKey }]"
            @click="arteryRBifKey = !arteryRBifKey"
          >
            <HeadSvg type="feature" />
          </span>
        </div>

        <div :class="['ownfeature--pos--box', { noavtive: !arteryRBifKey }]">
          <div class="ownfeature--pos">
            <span
              :class="[
                'ownfeature--pos--left',
                { active: RightCrossBifurcation_d },
              ]"
              >管径(mm):</span
            >
            <input
              type="text"
              :class="[
                'ownfeature--pos--val',
                { active: RightCrossBifurcation_d },
              ]"
              v-model="RightCrossBifurcation_d"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span
              :class="[
                'ownfeature--pos--left',
                { active: RightCrossBifurcation },
              ]"
              >IMT(cm):</span
            >
            <input
              type="text"
              :class="[
                'ownfeature--pos--val',
                { active: RightCrossBifurcation },
              ]"
              v-model="RightCrossBifurcation"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span
              :class="[
                'ownfeature--pos--left',
                { active: RightCrossBifurcation_PSED },
              ]"
              >PS/ED(cm/s):</span
            >
            <input
              type="text"
              :class="[
                'ownfeature--pos--val',
                { active: RightCrossBifurcation_PSED },
              ]"
              v-model="RightCrossBifurcation_PSED"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
        </div>

        <div class="ownfeature--sub--title">
          <span class="ownfeature--sub--left">R-ICA</span>
          <span
            :class="['ownfeature--sub--right', { noavtive: !arteryRICAKey }]"
            @click="arteryRICAKey = !arteryRICAKey"
          >
            <HeadSvg type="feature" />
          </span>
        </div>

        <div :class="['ownfeature--pos--box', { noavtive: !arteryRICAKey }]">
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: RightLongICA_d }]"
              >管径(mm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: RightLongICA_d }]"
              v-model="RightLongICA_d"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: RightLongICA }]"
              >IMT(mm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: RightLongICA }]"
              v-model="RightLongICA"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span
              :class="['ownfeature--pos--left', { active: RightLongICA_PSED }]"
              >PS/ED(cm/s):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: RightLongICA_PSED }]"
              v-model="RightLongICA_PSED"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
        </div>

        <div class="ownfeature--sub--title">
          <span class="ownfeature--sub--left">R-CCA</span>
          <span
            :class="['ownfeature--sub--right', { noavtive: !arteryRECAKey }]"
            @click="arteryRECAKey = !arteryRECAKey"
          >
            <HeadSvg type="feature" />
          </span>
        </div>

        <div :class="['ownfeature--pos--box', { noavtive: !arteryRECAKey }]">
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: RightLongCCA_d }]"
              >管径(mm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: RightLongCCA_d }]"
              v-model="RightLongCCA_d"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: RightLongCCA }]"
              >IMT(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: RightLongCCA }]"
              v-model="RightLongCCA"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span
              :class="['ownfeature--pos--left', { active: RightLongCCA_PSED }]"
              >PS/ED(cm/s):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: RightLongCCA_PSED }]"
              v-model="RightLongCCA_PSED"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
        </div>
      </div>
      <div class="ownfeature--box" v-if="pos == '消化系'">
        <div class="ownfeature--sub--title">
          <span class="ownfeature--sub--left">肝脏</span>
          <span
            :class="['ownfeature--sub--right', { noavtive: !liver1Key }]"
            @click="liver1Key = !liver1Key"
          >
            <HeadSvg type="feature" />
          </span>
        </div>
        <div :class="['ownfeature--pos--box', { noavtive: !liver1Key }]">
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: liver_11 }]"
              >左叶纵切上下径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: liver_11 }]"
              v-model="liver_11"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: liver_12 }]"
              >左叶纵切厚径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: liver_12 }]"
              v-model="liver_12"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: liver_21 }]"
              >右叶斜径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: liver_21 }]"
              v-model="liver_21"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
        </div>

        <div class="ownfeature--sub--title">
          <span class="ownfeature--sub--left">门静脉</span>
          <span
            :class="['ownfeature--sub--right', { noavtive: !liver5Key }]"
            @click="liver5Key = !liver5Key"
          >
            <HeadSvg type="feature" />
          </span>
        </div>

        <div :class="['ownfeature--pos--box', { noavtive: !liver5Key }]">
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: liver_51 }]"
              >主干内径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: liver_51 }]"
              v-model="liver_51"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
        </div>

        <div class="ownfeature--sub--title">
          <span class="ownfeature--sub--left">胆囊</span>
          <span
            :class="['ownfeature--sub--right', { noavtive: !liver3Key }]"
            @click="liver3Key = !liver3Key"
          >
            <HeadSvg type="feature" />
          </span>
        </div>

        <div :class="['ownfeature--pos--box', { noavtive: !liver3Key }]">
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: liver_31 }]"
              >胆囊长径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: liver_31 }]"
              v-model="liver_31"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: liver_32 }]"
              >胆囊宽径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: liver_32 }]"
              v-model="liver_32"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
        </div>

        <div class="ownfeature--sub--title">
          <span class="ownfeature--sub--left">脾脏</span>
          <span
            :class="['ownfeature--sub--right', { noavtive: !spleenKey }]"
            @click="spleenKey = !spleenKey"
          >
            <HeadSvg type="feature" />
          </span>
        </div>

        <div :class="['ownfeature--pos--box', { noavtive: !spleenKey }]">
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: spleen_4011 }]"
              >脾脏长径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: spleen_4011 }]"
              v-model="spleen_4011"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: spleen_4012 }]"
              >脾脏厚径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: spleen_4012 }]"
              v-model="spleen_4012"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: spleen_4021 }]"
              >脾门静脉内径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: spleen_4021 }]"
              v-model="spleen_4021"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
        </div>
      </div>
      <div class="ownfeature--box" v-if="pos == '泌尿系'">
        <div class="ownfeature--sub--title">
          <span class="ownfeature--sub--left">肾脏径线</span>
          <span
            :class="['ownfeature--sub--right', { noavtive: !urinaryKey }]"
            @click="urinaryKey = !urinaryKey"
          >
            <HeadSvg type="feature" />
          </span>
        </div>
        <div :class="['ownfeature--pos--box', { noavtive: !urinaryKey }]">
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: urinary_5011 }]"
              >左肾长径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: urinary_5011 }]"
              v-model="urinary_5011"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: urinary_5012 }]"
              >左肾宽径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: urinary_5012 }]"
              v-model="urinary_5012"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: urinary_5021 }]"
              >右肾长径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: urinary_5021 }]"
              v-model="urinary_5021"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
          <div class="ownfeature--pos">
            <span :class="['ownfeature--pos--left', { active: urinary_5022 }]"
              >右肾宽径(cm):</span
            >
            <input
              type="text"
              :class="['ownfeature--pos--val', { active: urinary_5022 }]"
              v-model="urinary_5022"
              :disabled="recordDisabled || !isCanEdit"
              placeholder="输入数值"
            />
          </div>
        </div>
      </div>
    </div>
    <div class="ownfeature--item">
      <div class="ownfeature--item--title">疑似异常特征</div>
      <div class="ownfeature--item--wrap">
        <template v-if="pos == '甲状腺' && lesionShow">
          <div
            class="ownfeature--box"
            v-for="(item, index) in LesionInfo"
            :key="item.id"
          >
            <div class="ownfeature--sub--title">
              <span class="ownfeature--sub--left"
                >疑似局灶性异常 {{ index + 1 }}
              </span>
              <span
                :class="['ownfeature--sub--right', { noavtive: !item.active }]"
                @click="changeLesionDomStatus(LesionInfo, index)"
              >
                <HeadSvg type="feature" />
              </span>
            </div>
            <div :class="['ownfeature--pos--box', { noavtive: !item.active }]">
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: item.jjzyj }]"
                  >左右径(cm):</span
                >
                <input
                  type="text"
                  :class="['ownfeature--pos--val', { active: item.jjzyj }]"
                  v-model="item.jjzyj"
                  :disabled="recordDisabled || !isCanEdit"
                  placeholder="输入数值"
                />
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: item.jjqhj }]"
                  >前后径(cm):</span
                >
                <input
                  type="text"
                  :class="['ownfeature--pos--val', { active: item.jjqhj }]"
                  v-model="item.jjqhj"
                  :disabled="recordDisabled || !isCanEdit"
                  placeholder="输入数值"
                />
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: item.jjsxj }]"
                  >上下径(cm):</span
                >
                <input
                  type="text"
                  :class="['ownfeature--pos--val', { active: item.jjsxj }]"
                  v-model="item.jjsxj"
                  :disabled="recordDisabled || !isCanEdit"
                  placeholder="输入数值"
                />
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
                  >位置:</span
                >
                <a-select
                  :class="['ownfeatureselect', { active: isCanEdit }]"
                  defaultValue="左叶上极"
                  v-model="item.loc"
                  :disabled="recordDisabled || !isCanEdit"
                >
                  <a-select-option value="左叶上极"> 左叶上极 </a-select-option>
                  <a-select-option value="左叶中部"> 左叶中部 </a-select-option>
                  <a-select-option value="左叶下极"> 左叶下极 </a-select-option>
                  <a-select-option value="右叶上极"> 右叶上极 </a-select-option>
                  <a-select-option value="右叶中部"> 右叶中部 </a-select-option>
                  <a-select-option value="右叶下极"> 右叶下极 </a-select-option>
                  <a-select-option value="峡部"> 峡部 </a-select-option>
                </a-select>
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
                  >形态:</span
                >
                <a-select
                  :class="['ownfeatureselect', { active: isCanEdit }]"
                  defaultValue="规则"
                  v-model="item.jj_shape"
                  :disabled="recordDisabled || !isCanEdit"
                >
                  <a-select-option value="规则"> 规则 </a-select-option>
                  <a-select-option value="不规则"> 不规则 </a-select-option>
                </a-select>
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
                  >纵横比:</span
                >
                <a-select
                  :class="['ownfeatureselect', { active: isCanEdit }]"
                  defaultValue="A/T≥1"
                  v-model="item.aspect_ratio"
                  :disabled="recordDisabled || !isCanEdit"
                >
                  <a-select-option value="A/T≥1"> A/T≥1 </a-select-option>
                  <a-select-option value="A/T＜1"> A/T＜1 </a-select-option>
                </a-select>
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
                  >边缘:</span
                >
                <a-select
                  :class="['ownfeatureselect', { active: isCanEdit }]"
                  defaultValue="光整"
                  v-model="item.edge"
                  :disabled="recordDisabled || !isCanEdit"
                >
                  <a-select-option value="光整"> 光整 </a-select-option>
                  <a-select-option value="不规则"> 不规则 </a-select-option>
                  <a-select-option value="模糊"> 模糊 </a-select-option>
                  <a-select-option value="甲状腺外侵犯" title="甲状腺外侵犯">
                    甲状腺外侵犯
                  </a-select-option>
                </a-select>
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
                  >声晕:</span
                >
                <a-select
                  :class="['ownfeatureselect', { active: isCanEdit }]"
                  defaultValue="无"
                  v-model="item.sonic_halo"
                  :disabled="recordDisabled || !isCanEdit"
                >
                  <a-select-option value="无"> 无 </a-select-option>
                  <a-select-option value="有"> 有 </a-select-option>
                </a-select>
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
                  >内部结构:</span
                >
                <a-select
                  :class="['ownfeatureselect', { active: isCanEdit }]"
                  defaultValue="实性"
                  v-model="item.structure"
                  :disabled="recordDisabled || !isCanEdit"
                >
                  <a-select-option value="实性"> 实性 </a-select-option>
                  <a-select-option value="囊实混合性" title="囊实混合性">
                    囊实混合性
                  </a-select-option>
                  <a-select-option value="囊性"> 囊性 </a-select-option>
                  <a-select-option value="海绵状"> 海绵状 </a-select-option>
                </a-select>
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
                  >回声强度:</span
                >
                <a-select
                  :class="['ownfeatureselect', { active: isCanEdit }]"
                  defaultValue="低回声"
                  v-model="item.jj_echo_intensity"
                  :disabled="recordDisabled || !isCanEdit"
                >
                  <a-select-option value="低回声"> 低回声 </a-select-option>
                  <a-select-option value="等回声"> 等回声 </a-select-option>
                  <a-select-option value="高回声"> 高回声 </a-select-option>
                  <a-select-option value="无回声"> 无回声 </a-select-option>
                </a-select>
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
                  >回声分布:</span
                >
                <a-select
                  :class="['ownfeatureselect', { active: isCanEdit }]"
                  defaultValue="均匀"
                  v-model="item.jj_echo_distribution"
                  :disabled="recordDisabled || !isCanEdit"
                >
                  <a-select-option value="均匀"> 均匀 </a-select-option>
                  <a-select-option value="不均匀"> 不均匀 </a-select-option>
                </a-select>
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
                  >局灶性强回声:</span
                >
                <a-select
                  :class="['ownfeatureselect', { active: isCanEdit }]"
                  defaultValue="无"
                  v-model="item.focal_hyperechoic"
                  :disabled="recordDisabled || !isCanEdit"
                >
                  <a-select-option value="无"> 无 </a-select-option>
                  <a-select-option value="点状强回声">
                    点状强回声
                  </a-select-option>
                  <a-select-option value="粗大钙化"> 粗大钙化 </a-select-option>
                </a-select>
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
                  >后方回声:</span
                >
                <a-select
                  :class="['ownfeatureselect', { active: isCanEdit }]"
                  defaultValue="无改变"
                  v-model="item.rear_echo"
                  :disabled="recordDisabled || !isCanEdit"
                >
                  <a-select-option value="无改变"> 无改变 </a-select-option>
                  <a-select-option value="增强"> 增强 </a-select-option>
                  <a-select-option value="衰减"> 衰减 </a-select-option>
                </a-select>
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
                  >血流:</span
                >
                <a-select
                  :class="['ownfeatureselect', { active: isCanEdit }]"
                  defaultValue="无血供"
                  v-model="item.blood_flow"
                  :disabled="recordDisabled || !isCanEdit"
                >
                  <a-select-option value="无血供"> 无血供 </a-select-option>
                  <a-select-option value="不丰富"> 不丰富 </a-select-option>
                  <a-select-option value="丰富"> 丰富 </a-select-option>
                </a-select>
              </div>
            </div>
          </div>
        </template>
        <template v-if="pos == '颈动脉' && lesionShow">
          <div
            class="ownfeature--box"
            v-for="(item, index) in LesionInfo"
            :key="item.id"
          >
            <div class="ownfeature--sub--title">
              <span class="ownfeature--sub--left"
                >疑似局灶性异常 {{ index + 1 }}
              </span>
              <span
                :class="['ownfeature--sub--right', { noavtive: !item.active }]"
                @click="changeLesionDomStatus(LesionInfo, index)"
              >
                <HeadSvg type="feature" />
              </span>
            </div>

            <div :class="['ownfeature--pos--box', { noavtive: !item.active }]">
              <div class="ownfeature--pos">
                <span
                  :class="['ownfeature--pos--left', { active: item.length }]"
                  >长度(cm):</span
                >
                <input
                  type="text"
                  :class="['ownfeature--pos--val', { active: item.length }]"
                  v-model="item.length"
                  :disabled="recordDisabled || !isCanEdit"
                  placeholder="输入数值"
                />
              </div>
              <div class="ownfeature--pos">
                <span
                  :class="['ownfeature--pos--left', { active: item.thickness }]"
                  >厚度(cm):</span
                >
                <input
                  type="text"
                  :class="['ownfeature--pos--val', { active: item.thickness }]"
                  v-model="item.thickness"
                  :disabled="recordDisabled || !isCanEdit"
                  placeholder="输入数值"
                />
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: item.loc }]"
                  >位置:</span
                >
                <input
                  type="text"
                  :class="['ownfeature--pos--val', { active: item.loc }]"
                  v-model="item.loc"
                  :disabled="recordDisabled || !isCanEdit"
                  placeholder="输入数值"
                />
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
                  >形态:</span
                >
                <a-select
                  :class="['ownfeatureselect', { active: isCanEdit }]"
                  defaultValue="规则"
                  v-model="item.shape"
                  :disabled="recordDisabled || !isCanEdit"
                >
                  <a-select-option value="规则"> 规则 </a-select-option>
                  <a-select-option value="不规则"> 不规则 </a-select-option>
                </a-select>
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
                  >回声强度:</span
                >
                <a-select
                  :class="['ownfeatureselect', { active: isCanEdit }]"
                  defaultValue="等回声"
                  v-model="item.echo_intensity"
                  :disabled="recordDisabled || !isCanEdit"
                >
                  <a-select-option value="等回声"> 等回声 </a-select-option>
                  <a-select-option value="低回声"> 低回声 </a-select-option>
                  <a-select-option value="高回声"> 高回声 </a-select-option>
                </a-select>
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
                  >回声分布:</span
                >
                <a-select
                  :class="['ownfeatureselect', { active: isCanEdit }]"
                  defaultValue="均匀"
                  v-model="item.echo_distribution"
                  :disabled="recordDisabled || !isCanEdit"
                >
                  <a-select-option value="均匀"> 均匀 </a-select-option>
                  <a-select-option value="不均匀"> 不均匀 </a-select-option>
                </a-select>
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: isCanEdit }]"
                  >狭窄程度:</span
                >
                <a-select
                  :class="['ownfeatureselect', { active: isCanEdit }]"
                  defaultValue="无"
                  v-model="item.narrow"
                  :disabled="recordDisabled || !isCanEdit"
                >
                  <a-select-option value="无"> 无 </a-select-option>
                  <a-select-option value="轻度"> 轻度 </a-select-option>
                  <a-select-option value="中度"> 中度 </a-select-option>
                  <a-select-option value="重度"> 重度 </a-select-option>
                </a-select>
              </div>
              <div class="ownfeature--pos">
                <span
                  :class="[
                    'ownfeature--pos--left',
                    { active: item.diameter_narrow },
                  ]"
                  >直径狭窄率:</span
                >
                <input
                  type="text"
                  :class="[
                    'ownfeature--pos--val',
                    { active: item.diameter_narrow },
                  ]"
                  v-model="item.diameter_narrow"
                  :disabled="recordDisabled || !isCanEdit"
                  placeholder="输入数值"
                />
              </div>
              <div class="ownfeature--pos">
                <span
                  :class="[
                    'ownfeature--pos--left',
                    { active: item.area_narrow },
                  ]"
                  >面积狭窄率:</span
                >
                <input
                  type="text"
                  :class="[
                    'ownfeature--pos--val',
                    { active: item.area_narrow },
                  ]"
                  v-model="item.area_narrow"
                  :disabled="recordDisabled || !isCanEdit"
                  placeholder="输入数值"
                />
              </div>
              <div class="ownfeature--pos">
                <span :class="['ownfeature--pos--left', { active: item.RI }]"
                  >RI:</span
                >
                <input
                  type="text"
                  :class="['ownfeature--pos--val', { active: item.RI }]"
                  v-model="item.RI"
                  :disabled="recordDisabled || !isCanEdit"
                  placeholder="输入数值"
                />
              </div>
            </div>
          </div>
        </template>
        <div class="ownfeature--box" v-if="pos == '消化系'"></div>
        <div class="ownfeature--box" v-if="pos == '泌尿系'"></div>
      </div>
    </div>
  </div>
</template>

<script>
import HeadSvg from "@/components/HeadSvg";
import {
  isEmpty,
  artery2E,
  artery_keys,
  artery_locs,
  arteryPSEDres,
  artery_default,
  artery_normal_default,
  diameter2E,
  thyroid2E,
  thyroid_keys,
  thyroid_locs,
  thyroid_default,
  thyroid_normal_default,
  digestive_keys,
  digestive2E,
  urinary2E,
  urinary_keys,
  customToFixed,
} from "@/utils";
import { v4 as uuidv4 } from "uuid";
import { dellLesionInfo } from "@/utils/lesionInfo";
export default {
  props: ["status", "pos", "featureData", "recordDisabled"],
  name: "OwnFeature",
  components: {
    HeadSvg,
  },
  data() {
    return {
      isCanEdit: true, //是否可以编辑

      arteryLBifKey: true, //颈动脉展开收起
      arteryLICAKey: true,
      arteryLECAKey: true,
      arteryRBifKey: true,
      arteryRICAKey: true,
      arteryRECAKey: true,
      //arteryLesionKey: true,

      LeftCrossBifurcation: "", //左 窦部
      LeftLongICA: "", //左 ICA
      LeftLongCCA: "", //左 CCA
      RightCrossBifurcation: "", //右 窦部
      RightLongICA: "", //右 ICA
      RightLongCCA: "", //右 CCA
      LeftLongICA_PSED: "",
      LeftLongCCA_PSED: "",
      LeftCrossBifurcation_PSED: "",
      RightLongICA_PSED: "",
      RightLongCCA_PSED: "",
      RightCrossBifurcation_PSED: "",
      width: "", //
      height: "",
      LeftCrossBifurcation_d: "", //左 窦部
      LeftLongCCA_d: "", //左 ICA
      LeftLongICA_d: "", //左 CCA
      RightCrossBifurcation_d: "", //右 窦部
      RightLongICA_d: "", //右 ICA
      RightLongCCA_d: "", //右 CCA

      IMT: "", //
      smooth: "", //内中膜光滑度
      plaque: "", //斑块
      narrow: "", //狭窄
      diameter_narrow: "", //直径狭窄率
      area_narrow: "", //面积狭窄率
      RI: "",

      thyroidThmusKey: true, //甲状腺展开收起
      thyroidRKey: true,
      //thyroidLesionKey: true,

      thyroid_0: "",
      thyroid_1: "",
      thyroid_2: "",
      thyroid_3: "",
      thyroid_4: "",
      thyroid_5: "",
      thyroid_6: "",
      thyroid_7: "",
      thyroid_8: "",
      thyroid_9: "",
      shape: "", //形态
      echo_intensity: "", //回声强度
      echo_distribution: "", //回声分布

      loc: "", //位置
      jj_shape: "", //形态
      aspect_ratio: "", //纵横比
      edge: "", //边缘
      sonic_halo: "", //声晕
      structure: "", //内部结构s
      jj_echo_intensity: "", //回声强度
      jj_echo_distribution: "", //回声分布
      focal_hyperechoic: "", //局灶性强回声
      rear_echo: "", //后方回声
      blood_flow: "", //血流
      comet_tail: "", //有无彗星尾伪像

      liver1Key: true, //消化系展开收起
      liver5Key: true,
      liver3Key: true,
      spleenKey: true,

      liver_11: "",
      liver_12: "",
      liver_21: "",
      liver_31: "",
      liver_32: "",
      liver_51: "",
      spleen_4011: "",
      spleen_4012: "",
      spleen_4021: "",

      urinaryKey: true, //泌尿系系展开收起
      urinary_5011: "",
      urinary_5012: "",
      urinary_5021: "",
      urinary_5022: "",

      LesionInfo: [], //病灶
      choseMatchLesionIndex: 0, //当前匹配第几个病灶的数据
    };
  },

  computed: {
    lesionShow() {
      if (this.LesionInfo.length > 0) {
        return true;
      } else {
        return false;
      }
    },
  },

  watch: {
    featureData: {
      immediate: true,
      deep: true,
      handler(val) {
        if (val) {
          this.initFeatureData();
        }
      },
    },
  },

  mounted() {
    // this.$EventBus.$on("reSetFeatureData", this.reSetData);
  },

  methods: {
    //获取测量及病灶数据
    initFeatureData() {
      try {
        if (!this.featureData) {
          console.log("没有测量数据:", this.featureData);
          this.LesionInfo = [];
          return;
        }
        this.LesionInfo = [];
        if (this.pos == "甲状腺") {
          const thyroid_measure = JSON.parse(this.featureData).thyroid_measure;
          this.shape = "规则";
          this.echo_intensity = "等回声";
          this.echo_distribution = "均匀";

          this.LesionInfo = JSON.parse(this.featureData).LesionInfo
            ? JSON.parse(this.featureData).LesionInfo
            : [];
          if (this.LesionInfo.length > 0) {
            //如果有病灶
            this.LesionInfo = this.LesionInfo.map((item) => {
              return {
                ...dellLesionInfo(thyroid_default, item),
                active: true,
                id: item.lesionId || uuidv4(),
              };
            }).map((item) => {
              return {
                ...item,
                jjqhj: customToFixed(item.jjqhj * 100, 2),
                jjsxj: customToFixed(item.jjsxj * 100, 2),
                jjzyj: customToFixed(item.jjzyj * 100, 2),
              };
            });
            console.log("有病灶:", this.LesionInfo);
          } else {
            //如果没有病灶
            console.log("没有病灶:", this.LesionInfo);
          }
          if (thyroid_measure && !isEmpty(thyroid_measure)) {
            console.log("有测量数据:", thyroid_measure);
            for (let prop in thyroid_measure) {
              if (thyroid_keys.includes(prop)) {
                const key = thyroid2E[prop];
                this[key] = thyroid_measure[prop];
              } else {
                this[prop] = thyroid_measure[prop];
              }
              //如果有病灶
              // if (
              //   thyroid_measure[7] ||
              //   thyroid_measure[8] ||
              //   thyroid_measure[9]
              // ) {
              //   console.log("有疑似异常特征");
              //   this.lesionShow = true;
              //   for (let prop in thyroid_default) {
              //     if (!thyroid_measure[prop]) {
              //       this[prop] = thyroid_default[prop];
              //     }
              //   }
              // } else {
              //   console.log("没有疑似异常特征");
              //   for (let prop in thyroid_normal_default) {
              //     if (!thyroid_measure[prop]) {
              //       this[prop] = thyroid_normal_default[prop];
              //     }
              //   }
              // }
            }
          } else {
            console.log("没有测量数据", thyroid_measure);
            for (let prop in thyroid_normal_default) {
              if (!thyroid_measure || !thyroid_measure[prop]) {
                this[prop] = thyroid_normal_default[prop];
              }
            }
          }
        }
        if (this.pos == "颈动脉") {
          const measure_info = JSON.parse(this.featureData);
          console.log("测量数据:", measure_info);
          const scanIMTInfo = measure_info.scanIMTInfo;
          const psedInfo = measure_info.psedInfo;
          const vesselDiameterInfo = measure_info.vesselDiameterInfo;
          this.IMT = "未见内中膜增厚";
          this.plaque = "无";
          this.smooth = "光滑";
          this.LesionInfo = JSON.parse(this.featureData).LesionInfo
            ? JSON.parse(this.featureData).LesionInfo
            : [];
          if (this.LesionInfo.length > 0) {
            //如果有病灶
            this.LesionInfo = this.LesionInfo.map((item) => {
              return {
                ...dellLesionInfo(artery_default, item),
                active: true,
                id: item.lesionId || uuidv4(),
              };
            });
            console.log("有病灶:", this.LesionInfo);
          } else {
            //如果没有病灶
            console.log("没有病灶:", this.LesionInfo);
          }
          // const plaque__measure = measure_info.plaque__measure;
          if (scanIMTInfo && !isEmpty(scanIMTInfo)) {
            for (let prop in scanIMTInfo) {
              if (artery_keys.includes(prop)) {
                const key = artery2E[prop];
                this[key] = scanIMTInfo[prop];
              } else {
                this[prop] = scanIMTInfo[prop];
              }
            }
          } else {
            console.log("没有scanIMTInfo测量数据");
            for (let prop in artery_normal_default) {
              if (!scanIMTInfo || !scanIMTInfo[prop]) {
                this[prop] = artery_normal_default[prop];
              }
            }
          }
          if (vesselDiameterInfo && !isEmpty(vesselDiameterInfo)) {
            for (let prop in vesselDiameterInfo) {
              if (artery_keys.includes(prop)) {
                const key = diameter2E[prop];
                this[key] = vesselDiameterInfo[prop];
              }
            }
          }

          if (psedInfo && !isEmpty(psedInfo)) {
            for (let prop in psedInfo) {
              const key = arteryPSEDres[prop];
              this[key] = psedInfo[prop];
            }
          }
          // if (
          //   plaque__measure &&
          //   !isEmpty(plaque__measure) &&
          //   plaque__measure.width &&
          //   plaque__measure.height
          // ) {
          //   console.log("有疑似异常特征");
          //   this.width = plaque__measure.width;
          //   this.height = plaque__measure.height;
          //   for (let prop in artery_default) {
          //     if (!scanIMTInfo) {
          //       this[prop] = artery_default[prop];
          //     }
          //   }
          // } else {
          //   console.log("没有疑似异常特征");
          //   for (let prop in artery_normal_default) {
          //     if (!scanIMTInfo) {
          //       this[prop] = artery_normal_default[prop];
          //     }
          //   }
          // }
        }
        if (this.pos == "消化系") {
          const measure_info = JSON.parse(this.featureData);
          console.log("测量数据:", measure_info);
          const digestiveMeasure = measure_info.digestiveMeasure;
          const spleenMeasure = measure_info.spleenMeasure;
          if (digestiveMeasure && !isEmpty(digestiveMeasure)) {
            for (let prop in digestiveMeasure) {
              if (digestive_keys.includes(prop)) {
                const key = digestive2E[prop];
                this[key] = digestiveMeasure[prop];
              }
            }
          }
          if (spleenMeasure && !isEmpty(spleenMeasure)) {
            for (let prop in spleenMeasure) {
              if (digestive_keys.includes(prop)) {
                const key = digestive2E[prop];
                this[key] = spleenMeasure[prop];
              }
            }
          }
        }
        if (this.pos == "泌尿系") {
          const measure_info = JSON.parse(this.featureData);
          console.log("测量数据:", measure_info);
          const urinaryMeasure = measure_info.urinaryMeasure;
          if (urinaryMeasure && !isEmpty(urinaryMeasure)) {
            for (let prop in urinaryMeasure) {
              if (urinary_keys.includes(prop)) {
                const key = urinary2E[prop];
                this[key] = urinaryMeasure[prop];
              }
            }
          }
        }
      } catch (error) {
        console.log("initFeatureData error:", error);
      }
    },
    //获取特征数据
    getFeatureData() {
      try {
        let params = {};
        if (this.pos == "甲状腺") {
          //测量值
          thyroid_keys.forEach((item) => {
            const key = thyroid2E[item];
            params[item] = this[key];
          });
          //病灶值
          if (this.LesionInfo.length > 0) {
            const cur_LesionInfo = this.LesionInfo[this.choseMatchLesionIndex];
            thyroid_locs.forEach((item) => {
              if (
                item == `shape` ||
                item == `echo_intensity` ||
                item == `echo_distribution`
              ) {
                console.log(item);
                params[item] = this[item];
              } else {
                params[item] = cur_LesionInfo[item];
              }
            });
          }
          return { thyroid_measure: params, LesionInfo: this.LesionInfo };
        } else if (this.pos == "颈动脉") {
          //原始数据
          const origin_Ri_measure = JSON.parse(this.featureData).Ri_measure;
          const origin_scanIMTInfo = JSON.parse(this.featureData).scanIMTInfo;
          const origin_vesselDiameterInfo = JSON.parse(
            this.featureData
          ).vesselDiameterInfo;
          // const origin_plaque__measure =  JSON.parse(this.featureData).scanIMTInfo;
          // console.log("origin_Ri_measure:", origin_Ri_measure);
          // const origin_psedInfo = JSON.parse(this.featureData).psedInfo;
          if (!isEmpty(origin_Ri_measure) && origin_Ri_measure) {
            params.Ri_measure = origin_Ri_measure;
          }
          const new_scanIMTInfo = {};
          const new_vesselDiameterInfo = {};
          artery_keys.forEach((item) => {
            const key = artery2E[item];
            const keyd = diameter2E[item];
            new_scanIMTInfo[item] = this[key];
            new_vesselDiameterInfo[item] = this[keyd];
          });
          artery_locs.forEach((item) => {
            new_scanIMTInfo[item] = this[item];
          });
          if (!isEmpty(origin_scanIMTInfo)) {
            params.scanIMTInfo = {
              ...origin_scanIMTInfo,
              ...new_scanIMTInfo,
            };
          } else {
            params.scanIMTInfo = {
              ...new_scanIMTInfo,
            };
          }
          if (!isEmpty(origin_vesselDiameterInfo)) {
            params.vesselDiameterInfo = {
              ...origin_vesselDiameterInfo,
              ...new_vesselDiameterInfo,
            };
          } else {
            params.vesselDiameterInfo = {
              ...new_vesselDiameterInfo,
            };
          }
          const new_psedInfo = {};
          for (let prop in arteryPSEDres) {
            let key = arteryPSEDres[prop];
            new_psedInfo[prop] = this[key];
          }
          params.psedInfo = new_psedInfo;
          // params.plaque__measure = {
          //   width: this.width,
          //   height: this.height,
          // };
          //病灶
          if (this.LesionInfo.length > 0) {
            const cur_LesionInfo = this.LesionInfo[this.choseMatchLesionIndex];
            params.plaque__measure = {};
            artery_locs.forEach((item) => {
              if (item == `IMT` || item == `smooth` || item == `plaque`) {
                params.scanIMTInfo[item] = this[item];
              } else if (item == `length`) {
                params.plaque__measure["width"] = cur_LesionInfo[item];
              } else if (item == `thickness`) {
                params.plaque__measure["height"] = cur_LesionInfo[item];
              } else {
                params.scanIMTInfo[item] = cur_LesionInfo[item];
              }
            });
          }
          params.LesionInfo = this.LesionInfo;
          return params;
        } else if (this.pos == "消化系") {
          const digestiveMeasure = {};
          const spleenMeasure = {};
          digestive_keys.forEach((item) => {
            const key = digestive2E[item];
            if (item.includes("4")) {
              spleenMeasure[item] = this[key];
            } else {
              digestiveMeasure[item] = this[key];
            }
          });
          return { digestiveMeasure, spleenMeasure };
        } else if (this.pos == "泌尿系") {
          urinary_keys.forEach((item) => {
            const key = urinary2E[item];
            params[item] = this[key];
          });
          return { urinaryMeasure: params };
        } else {
          return null;
        }
      } catch (error) {
        console.log("getFeatureData:", error);
      }
    },
    //获取匹配数据
    getMatching() {
      try {
        const data = this.getFeatureData();
        console.log("getMatching", data);
        if (this.pos == "甲状腺") {
          return { ...data.thyroid_measure };
        } else if (this.pos == "颈动脉") {
          return {
            ...data.scanIMTInfo,
            ...data.psedInfo,
            ...data.plaque__measure,
          };
        } else if (this.pos == "消化系") {
          return {
            ...data.digestiveMeasure,
            ...data.spleenMeasure,
          };
        } else if (this.pos == "泌尿系") {
          return {
            ...data.urinaryMeasure,
          };
        }
      } catch (error) {
        console.log("getMatching:", error);
      }
    },
    //改变编辑状态
    changeEditStatus() {
      this.isCanEdit = !this.isCanEdit;
    },
    //重置数据
    reSetData() {
      this.isCanEdit = false;
      if (this.pos == "颈动脉") {
        artery_keys.forEach((item) => {
          const key = artery2E[item];
          const keyd = diameter2E[item];
          this[key] = "";
          this[keyd] = "";
        });
        for (let prop in arteryPSEDres) {
          let key = arteryPSEDres[prop];
          this[key] = "";
        }
        for (let prop in artery_default) {
          this[prop] = artery_default[prop];
        }
      } else if (this.pos == "甲状腺") {
        thyroid_keys.forEach((item) => {
          const key = thyroid2E[item];
          this[key] = "";
        });
        thyroid_locs.forEach((item) => {
          this[item] = "";
        });
      } else if (this.pos == "消化系") {
        digestive_keys.forEach((item) => {
          const key = digestive2E[item];
          this[key] = "";
        });
      } else if (this.pos == "泌尿系") {
        urinary_keys.forEach((item) => {
          const key = urinary2E[item];
          this[key] = "";
        });
      }
    },
    //改变病灶栏状态
    changeLesionDomStatus(origin, i) {
      try {
        origin[i].active = !origin[i].active;
      } catch (error) {
        console.log("changeLesionDomStatus", error);
      }
    },
    //改变病灶数据位置
    changeLesionDomPos(index) {
      try {
        if (this.LesionInfo.length > 0) {
          // 查找匹配的项的索引
          console.log(this.LesionInfo);
          const targetIndex = this.LesionInfo.findIndex(
            (item) => item.id == index
          );
          console.log("changeLesionDomPos", targetIndex);
          if (targetIndex !== -1) {
            this.choseMatchLesionIndex = targetIndex;
            this.LesionInfo.forEach((item) => {
              item.active = false;
            });
            this.LesionInfo[targetIndex].active = true;
            // // 如果找到匹配的项
            // const targetItem = this.LesionInfo[targetIndex];
            // // 删除该项
            // this.LesionInfo.splice(targetIndex, 1);
            // // 将匹配的项插入到数组的第一位
            // this.LesionInfo.unshift(targetItem);
          }
        }
      } catch (err) {
        console.log("changeLesionDomPos", err);
      }
    },
  },
};
</script>

<style lang="less" scoped>
@import "~@/assets/css/ownfeature.less";
</style>
